/**
 * Created by IntelliJ IDEA.
 * User: Bezdelnick
 * Date: 9/26/12
 * Time: 8:07 PM
 * To change this template use File | Settings | File Templates.
 */
package vplib.component {

import alternativa.engine3d.objects.Mesh;

import vplib.model.AbstractPhysicsModel;

public class AbstractPhysicsComponent {
    protected var _uniqueId:String;
    protected var _surface:Mesh;
    protected var _model:AbstractPhysicsModel;

    /**
     * @description
     *      Abstract Physics Component composed with surface and math-model.
     *      You must specify unique id for component
     *
     * @param uniqueId - unique identifier for searching necessary component
     */
    public function AbstractPhysicsComponent(uniqueId:String) {
        _uniqueId = uniqueId;
    }

    /**
     * @description Return unique identifier
     */
    public function get uniqueId():String {
        return _uniqueId;
    }

    /**
     * @description Return surface object, which extends with alternativa.engine3d.objects.Mesh
     */
    public function get surface():Mesh {
        return _surface;
    }

    /**
     * @description Return mathematics model of current component.
     */
    public function get model():AbstractPhysicsModel {
        return _model;
    }

    /**
     * @description This method may be used for applying mathematics model for surface. You must override this method.
     */
    public function applyModelToSurface():void {
        // Override this!!!
    }
}
}
